using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Redis_demo.Entities;

namespace Redis_demo.EntityConfigs;

public class ShopEntityConfig : IEntityTypeConfiguration<Shop>
{
    public void Configure(EntityTypeBuilder<Shop> builder)
    {
        builder.ToTable("Shops");
        builder.Property(x => x.Id).IsRequired();
        builder.Property(x => x.Address).HasMaxLength(400);
    }
}
